package com.stx.test.object;

/**
 * packageName com.stx.test.object
 *
 * @author YangYi
 * @className CloneExample
 * @date 2025/9/17
 * @description TODO
 */

public class CloneExample {
    public static void main(String[] args) {
        MyClass obj = new MyClass(10);

        try {
            MyClass clonedObj = (MyClass) obj.clone();
            System.out.println("Original value: " + obj.getValue());
            System.out.println("Cloned value: " + clonedObj.getValue());
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
    }
}
